Skip to content

fix(find): mark a no-match find as not dispatched, and name the viewport a gesture left - #5018

Merged
thymikee merged 2 commits into
callstack:mainfrom
imranbarbhuiya:fix/find-and-gesture-messages
Nov 23, 2026
Merged

thymikee merged 2 commits into
callstack:mainfrom
imranbarbhuiya:fix/find-and-gesture-messages

Conversation

@imranbarbhuiya

@imranbarbhuiya imranbarbhuiya commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A find that matched nothing was disclosed as "May have reached the device", because a bare find is a click. It's now dispatched: no, and the click case points to find text "..." exists for lookups.

A gesture that leaves the viewport now names the viewport size and the first point outside it. When a coordinate caused the refusal, the hint says to use snapshot units, which are points on Apple platforms, not screenshot pixels. commands.md says so too.

Before / after

Pixel 9 AVD (Android 16), in Settings:

$ find "All projects"
base a4f2dcad0: find did not match any element. May have reached the device. Next: Run snapshot… Read the diagnostics log for the failing step.
head c6f1ba8bc: find did not match any element. Not dispatched. Next: Run snapshot -i…, or scroll first… This find clicks its match; to look an element up without acting on it, use find text "..." exists.
$ swipe 380 3000 20 3000
base: Gesture trajectory does not fit inside the viewport.
head: Gesture point (380, 3000) is outside the usable area of the 1080x2424 viewport.

Validation

  • Head c6f1ba8bc, check:affected --run --head, exactCommit: true. Every gate passes except unit: upload-http-deadline and committed-source-tree fail the same way on clean main on this macOS host, and two 5 s load timeouts pass when run alone.
  • command-docs, doc-links and doc-prose pass.
  • The find contract test fails without the fix (unknown instead of no).

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

@thymikee

Copy link
Copy Markdown
Member

Thanks for the change. The code at c6f1ba8 is ready: a no-match find now reports as not dispatched, and the out-of-bounds gesture message names the viewport. The live evidence covers an Android emulator, and Not verified here: the Apple units claim (points, not screenshot pixels) and a run on an iOS device. Not blocking, and fine to take or leave: no test asserts the new out-of-bounds message or the find no-match hints; the docs line says the message names the first point outside the viewport, but the transform minimum-span refusal names the viewport only, and the Retry list of dispatched: no refusals omits the find no-match; and the read-only find no-match (get text, get attrs, exists) throws the same error without the new hint, which could be a follow-up issue. The Smoke Tests failure comes from the Linux desktop job's apt install step, which this diff does not exercise, so it is likely unrelated. There are no conflicts. Rerunning that job is the only step left before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 23, 2026
@thymikee
thymikee merged commit b1d237e into callstack:main Nov 23, 2026
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants